old = r'C:\Users\liu\Desktop\22.DZK'
new = r'C:\Users\liu\Desktop\utf.zk'
with open(old,'rb') as fd:
    with open(new,'wb') as f:
        while True:
            a = fd.read(32)
            for w in a:
                flag = 1
                x = bin(w).replace('0b','')
                while len(x)<8:
                    x = '0' + x
                for r in x:
                    if r == '0':
                        f.write(b'\x00\x00')
                    else:
                        f.write(b'\xff\xff')
